<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>pymunk.constraint Module &mdash; pymunk 4.0.0 documentation</title>
    
    <link rel="stylesheet" href="_static/pymunk.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '4.0.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/pymunk_favicon.ico"/>
    <link rel="top" title="pymunk 4.0.0 documentation" href="index.html" />
    <link rel="up" title="API Reference" href="pymunk.html" />
    <link rel="next" title="pymunk.vec2d Module" href="pymunk.vec2d.html" />
    <link rel="prev" title="API Reference" href="pymunk.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pymunk.vec2d.html" title="pymunk.vec2d Module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="pymunk.html" title="API Reference"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">pymunk 4.0.0 documentation</a> &raquo;</li>
          <li><a href="pymunk.html" accesskey="U">API Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="pymunk-constraint-module">
<h1><a class="reference internal" href="#module-pymunk.constraint" title="pymunk.constraint"><tt class="xref py py-mod docutils literal"><span class="pre">pymunk.constraint</span></tt></a> Module<a class="headerlink" href="#pymunk-constraint-module" title="Permalink to this headline">¶</a></h1>
<div class="custom-index container">
<script type="text/javascript" src='_static/pymunk.js'></script></div>
<span class="target" id="module-pymunk.constraint"></span><p>A constraint is something that describes how two bodies interact with 
each other. (how they constrain each other). Constraints can be simple 
joints that allow bodies to pivot around each other like the bones in your 
body, or they can be more abstract like the gear joint or motors.</p>
<p>This submodule contain all the constraints that are supported by pymunk.</p>
<p>Chipmunk has a good overview of the different constraint on youtube which 
works fine to showcase them in pymunk as well. 
<a class="reference external" href="http://www.youtube.com/watch?v=ZgJJZTS0aMM">http://www.youtube.com/watch?v=ZgJJZTS0aMM</a></p>
<iframe width="420" height="315" style="display: block; margin: 0 auto;"
src="http://www.youtube.com/embed/ZgJJZTS0aMM" frameborder="0" 
allowfullscreen></iframe><dl class="class">
<dt id="pymunk.constraint.Constraint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">Constraint</tt><big>(</big><em>constraint=None</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#Constraint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.Constraint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Base class of all constraints.</p>
<p>You usually don&#8217;t want to create instances of this class directly, but 
instead use one of the specific constraints such as the PinJoint.</p>
<dl class="method">
<dt id="pymunk.constraint.Constraint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>constraint=None</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#Constraint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.Constraint.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.Constraint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.Constraint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.Constraint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#Constraint.activate_bodies"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.Constraint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.Constraint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.Constraint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.Constraint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.Constraint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.Constraint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.Constraint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.Constraint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.Constraint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.Constraint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.Constraint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.DampedRotarySpring">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">DampedRotarySpring</tt><big>(</big><em>a</em>, <em>b</em>, <em>rest_angle</em>, <em>stiffness</em>, <em>damping</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#DampedRotarySpring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Like a damped spring, but works in an angular fashion</p>
<dl class="method">
<dt id="pymunk.constraint.DampedRotarySpring.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>rest_angle</em>, <em>stiffness</em>, <em>damping</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#DampedRotarySpring.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Like a damped spring, but works in an angular fashion.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><dl class="first last docutils">
<dt>rest_angle</dt>
<dd><p class="first last">The relative angle in radians that the bodies want to have</p>
</dd>
<dt>stiffness</dt>
<dd><p class="first last">The spring constant (Young&#8217;s modulus).</p>
</dd>
<dt>damping</dt>
<dd><p class="first last">How soft to make the damping of the spring.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.DampedRotarySpring.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.damping">
<tt class="descname">damping</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.damping" title="Permalink to this definition">¶</a></dt>
<dd><p>How soft to make the damping of the spring.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.rest_angle">
<tt class="descname">rest_angle</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.rest_angle" title="Permalink to this definition">¶</a></dt>
<dd><p>The relative angle in radians that the bodies want to have</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.stiffness">
<tt class="descname">stiffness</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.stiffness" title="Permalink to this definition">¶</a></dt>
<dd><p>The spring constant (Young&#8217;s modulus).</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedRotarySpring.torque_func">
<tt class="descname">torque_func</tt><a class="headerlink" href="#pymunk.constraint.DampedRotarySpring.torque_func" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the torque function</p>
<p>func(self, relative_angle) -&gt; torque</p>
<dl class="docutils">
<dt>Callback Parameters</dt>
<dd><dl class="first last docutils">
<dt>relative_angle <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd>The relative angle</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.DampedSpring">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">DampedSpring</tt><big>(</big><em>a</em>, <em>b</em>, <em>anchr1</em>, <em>anchr2</em>, <em>rest_length</em>, <em>stiffness</em>, <em>damping</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#DampedSpring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.DampedSpring" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>A damped spring</p>
<dl class="method">
<dt id="pymunk.constraint.DampedSpring.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>anchr1</em>, <em>anchr2</em>, <em>rest_length</em>, <em>stiffness</em>, <em>damping</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#DampedSpring.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.DampedSpring.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Defined much like a slide joint.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><dl class="first last docutils">
<dt>anchr1 <span class="classifier-delimiter">:</span> <span class="classifier">Vec2d or (x,y)</span></dt>
<dd><p class="first last">Anchor point 1, relative to body a</p>
</dd>
<dt>anchr2 <span class="classifier-delimiter">:</span> <span class="classifier">Vec2d or (x,y)</span></dt>
<dd><p class="first last">Anchor point 2, relative to body b</p>
</dd>
<dt>rest_length <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">The distance the spring wants to be.</p>
</dd>
<dt>stiffness <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">The spring constant (Young&#8217;s modulus).</p>
</dd>
<dt>damping <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">How soft to make the damping of the spring.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.DampedSpring.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.DampedSpring.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.anchr1">
<tt class="descname">anchr1</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.anchr1" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.anchr2">
<tt class="descname">anchr2</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.anchr2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.damping">
<tt class="descname">damping</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.damping" title="Permalink to this definition">¶</a></dt>
<dd><p>How soft to make the damping of the spring.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.rest_length">
<tt class="descname">rest_length</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.rest_length" title="Permalink to this definition">¶</a></dt>
<dd><p>The distance the spring wants to be.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.DampedSpring.stiffness">
<tt class="descname">stiffness</tt><a class="headerlink" href="#pymunk.constraint.DampedSpring.stiffness" title="Permalink to this definition">¶</a></dt>
<dd><p>The spring constant (Young&#8217;s modulus).</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.GearJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">GearJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>phase</em>, <em>ratio</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#GearJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.GearJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Keeps the angular velocity ratio of a pair of bodies constant.</p>
<dl class="method">
<dt id="pymunk.constraint.GearJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>phase</em>, <em>ratio</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#GearJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.GearJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Keeps the angular velocity ratio of a pair of bodies constant. 
ratio is always measured in absolute terms. It is currently not 
possible to set the ratio in relation to a third body&#8217;s angular 
velocity. phase is the initial angular offset of the two bodies.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.GearJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.GearJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.phase">
<tt class="descname">phase</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.phase" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GearJoint.ratio">
<tt class="descname">ratio</tt><a class="headerlink" href="#pymunk.constraint.GearJoint.ratio" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.GrooveJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">GrooveJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>groove_a</em>, <em>groove_b</em>, <em>anchr2</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#GrooveJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.GrooveJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Similar to a pivot joint, but one of the anchors is
on a linear slide instead of being fixed.</p>
<dl class="method">
<dt id="pymunk.constraint.GrooveJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>groove_a</em>, <em>groove_b</em>, <em>anchr2</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#GrooveJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.GrooveJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>The groove goes from groove_a to groove_b on body a, and the pivot 
is attached to anchr2 on body b. All coordinates are body local.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.GrooveJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.GrooveJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.anchr2">
<tt class="descname">anchr2</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.anchr2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.groove_a">
<tt class="descname">groove_a</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.groove_a" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.groove_b">
<tt class="descname">groove_b</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.groove_b" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.GrooveJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.GrooveJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.PinJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">PinJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>anchr1=(0</em>, <em>0)</em>, <em>anchr2=(0</em>, <em>0)</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#PinJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.PinJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Keeps the anchor points at a set distance from one another.</p>
<dl class="method">
<dt id="pymunk.constraint.PinJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>anchr1=(0</em>, <em>0)</em>, <em>anchr2=(0</em>, <em>0)</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#PinJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.PinJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>a and b are the two bodies to connect, and anchr1 and anchr2 are the
anchor points on those bodies.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.PinJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.PinJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.anchr1">
<tt class="descname">anchr1</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.anchr1" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.anchr2">
<tt class="descname">anchr2</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.anchr2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.distance">
<tt class="descname">distance</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.distance" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PinJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.PinJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.PivotJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">PivotJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>*args</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#PivotJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.PivotJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Simply allow two objects to pivot about a single point.</p>
<dl class="method">
<dt id="pymunk.constraint.PivotJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>*args</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#PivotJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.PivotJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>a and b are the two bodies to connect, and pivot is the point in
world coordinates of the pivot. Because the pivot location is given in
world coordinates, you must have the bodies moved into the correct
positions already. 
Alternatively you can specify the joint based on a pair of anchor 
points, but make sure you have the bodies in the right place as the 
joint will fix itself as soon as you start simulating the space.</p>
<p>That is, either create the joint with PivotJoint(a, b, pivot) or 
PivotJoint(a, b, anchr1, anchr2).</p>
<blockquote>
<div><dl class="docutils">
<dt>a <span class="classifier-delimiter">:</span> <span class="classifier"><cite>Body</cite></span></dt>
<dd>The first of the two bodies</dd>
<dt>b <span class="classifier-delimiter">:</span> <span class="classifier"><cite>Body</cite></span></dt>
<dd>The second of the two bodies</dd>
<dt>args <span class="classifier-delimiter">:</span> <span class="classifier">[Vec2d] or [Vec2d,Vec2d]</span></dt>
<dd>Either one pivot point, or two anchor points</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.PivotJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.PivotJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.anchr1">
<tt class="descname">anchr1</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.anchr1" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.anchr2">
<tt class="descname">anchr2</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.anchr2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.PivotJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.PivotJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.RatchetJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">RatchetJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>phase</em>, <em>ratchet</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#RatchetJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.RatchetJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Works like a socket wrench.</p>
<dl class="method">
<dt id="pymunk.constraint.RatchetJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>phase</em>, <em>ratchet</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#RatchetJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.RatchetJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Works like a socket wrench. ratchet is the distance between 
&#8220;clicks&#8221;, phase is the initial offset to use when deciding where the 
ratchet angles are.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.RatchetJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.RatchetJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.angle">
<tt class="descname">angle</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.angle" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.phase">
<tt class="descname">phase</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.phase" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RatchetJoint.ratchet">
<tt class="descname">ratchet</tt><a class="headerlink" href="#pymunk.constraint.RatchetJoint.ratchet" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.RotaryLimitJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">RotaryLimitJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>min</em>, <em>max</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#RotaryLimitJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Constrains the relative rotations of two bodies.</p>
<dl class="method">
<dt id="pymunk.constraint.RotaryLimitJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>min</em>, <em>max</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#RotaryLimitJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Constrains the relative rotations of two bodies. min and max are 
the angular limits in radians. It is implemented so that it&#8217;s possible 
to for the range to be greater than a full revolution.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.RotaryLimitJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.max">
<tt class="descname">max</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.max" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.RotaryLimitJoint.min">
<tt class="descname">min</tt><a class="headerlink" href="#pymunk.constraint.RotaryLimitJoint.min" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.SimpleMotor">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">SimpleMotor</tt><big>(</big><em>a</em>, <em>b</em>, <em>rate</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#SimpleMotor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.SimpleMotor" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Keeps the relative angular velocity of a pair of bodies constant.</p>
<dl class="method">
<dt id="pymunk.constraint.SimpleMotor.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>rate</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#SimpleMotor.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.SimpleMotor.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Keeps the relative angular velocity of a pair of bodies constant. 
rate is the desired relative angular velocity. You will usually want 
to set an force (torque) maximum for motors as otherwise they will be 
able to apply a nearly infinite torque to keep the bodies moving.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.SimpleMotor.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.SimpleMotor.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SimpleMotor.rate">
<tt class="descname">rate</tt><a class="headerlink" href="#pymunk.constraint.SimpleMotor.rate" title="Permalink to this definition">¶</a></dt>
<dd><p>The desired relative angular velocity</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="pymunk.constraint.SlideJoint">
<em class="property">class </em><tt class="descclassname">pymunk.constraint.</tt><tt class="descname">SlideJoint</tt><big>(</big><em>a</em>, <em>b</em>, <em>anchr1</em>, <em>anchr2</em>, <em>min</em>, <em>max</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#SlideJoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.SlideJoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymunk.constraint.Constraint" title="pymunk.constraint.Constraint"><tt class="xref py py-class docutils literal"><span class="pre">pymunk.constraint.Constraint</span></tt></a></p>
<p>Like pin joints, but have a minimum and maximum distance.
A chain could be modeled using this joint. It keeps the anchor points 
from getting to far apart, but will allow them to get closer together.</p>
<dl class="method">
<dt id="pymunk.constraint.SlideJoint.__init__">
<tt class="descname">__init__</tt><big>(</big><em>a</em>, <em>b</em>, <em>anchr1</em>, <em>anchr2</em>, <em>min</em>, <em>max</em><big>)</big><a class="reference internal" href="_modules/pymunk/constraint.html#SlideJoint.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymunk.constraint.SlideJoint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>a and b are the two bodies to connect, anchr1 and anchr2 are the
anchor points on those bodies, and min and max define the allowed
distances of the anchor points.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.a">
<tt class="descname">a</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>The first of the two bodies constrained</p>
</dd></dl>

<dl class="method">
<dt id="pymunk.constraint.SlideJoint.activate_bodies">
<tt class="descname">activate_bodies</tt><big>(</big><big>)</big><a class="headerlink" href="#pymunk.constraint.SlideJoint.activate_bodies" title="Permalink to this definition">¶</a></dt>
<dd><p>Activate the bodies this constraint is attached to</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.anchr1">
<tt class="descname">anchr1</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.anchr1" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.anchr2">
<tt class="descname">anchr2</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.anchr2" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.b">
<tt class="descname">b</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>The second of the two bodies constrained</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.error_bias">
<tt class="descname">error_bias</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.error_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The rate at which joint error is corrected.</p>
<p>Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of 
the error every 1/60th of a second.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.impulse">
<tt class="descname">impulse</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.impulse" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the last impulse applied by this constraint.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.max">
<tt class="descname">max</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.max" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.max_bias">
<tt class="descname">max_bias</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.max_bias" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum rate at which joint error is corrected. Defaults 
to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.max_force">
<tt class="descname">max_force</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.max_force" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum force that the constraint can use to act on the two 
bodies. Defaults to infinity</p>
</dd></dl>

<dl class="attribute">
<dt id="pymunk.constraint.SlideJoint.min">
<tt class="descname">min</tt><a class="headerlink" href="#pymunk.constraint.SlideJoint.min" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/pymunk_logo_sphinx.png" alt="Logo"/>
            </a></p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="readme.html">Readme</a></li>
<li class="toctree-l1"><a class="reference internal" href="news.html">News</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="pymunk.html">API Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="pymunk.html#pymunk-package"><tt class="docutils literal"><span class="pre">pymunk</span></tt> Package</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href=""><tt class="docutils literal"><span class="pre">pymunk.constraint</span></tt> Module</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.vec2d.html"><tt class="docutils literal"><span class="pre">pymunk.vec2d</span></tt> Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.util.html"><tt class="docutils literal"><span class="pre">pymunk.util</span></tt> Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.pygame_util.html"><tt class="docutils literal"><span class="pre">pymunk.pygame_util</span></tt> Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymunk.pyglet_util.html"><tt class="docutils literal"><span class="pre">pymunk.pyglet_util</span></tt> Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymunkoptions.html"><tt class="docutils literal"><span class="pre">pymunkoptions</span></tt> Module</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced</a></li>
<li class="toctree-l1"><a class="reference external" href="http://code.google.com/p/pymunk/issues/list">Issue Tracker</a></li>
<li class="toctree-l1"><a class="reference external" href="http://code.google.com/p/pymunk/source/checkout">Source Repository</a></li>
<li class="toctree-l1"><a class="reference external" href="http://code.google.com/p/pymunk/downloads/list">Downloads</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="pymunk.html"
                        title="previous chapter">API Reference</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pymunk.vec2d.html"
                        title="next chapter"><tt class="docutils literal"><span class="pre">pymunk.vec2d</span></tt> Module</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/pymunk.constraint.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pymunk.vec2d.html" title="pymunk.vec2d Module"
             >next</a> |</li>
        <li class="right" >
          <a href="pymunk.html" title="API Reference"
             >previous</a> |</li>
        <li><a href="index.html">pymunk 4.0.0 documentation</a> &raquo;</li>
          <li><a href="pymunk.html" >API Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, Victor Blomqvist.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
    </div>
  </body>
</html>